<!--
旋转木马
  试试x轴，上下旋转
    - 旋转轴：x轴
    - 周边图片：往z移动，旋转x特定角度
-->
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body {
    perspective: 1500px;
  }
  .box {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 200px auto;
    transform-style: preserve-3d;
    animation: myAnimation 5s linear infinite;
  }
  .box:hover {
    animation-play-state: paused;
  }
  @keyframes myAnimation {
    to {
      /* transform: rotateX(360deg); */
      /* transform: rotateY(360deg); */
      transform: rotateY(360deg) rotateX(360deg);
    }
  }

  .box div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(./img/item.png) no-repeat;
    background-size: 100%;
  }
  /* 周边图片【先旋转、后位移】 */
  /* 角度：6张图，x轴平均60度；位移：都是z=300px。 */
  .box div:nth-child(2) {
    transform: translateZ(200px);
  }
  .box div:nth-child(3) {
    transform: rotateX(60deg) translateZ(200px);
  }
  .box div:nth-child(4) {
    transform: rotateX(120deg) translateZ(200px);
  }
  .box div:nth-child(5) {
    transform: rotateX(180deg) translateZ(200px);
  }
  .box div:nth-child(6) {
    transform: rotateX(240deg) translateZ(200px);
  }
  .box div:nth-child(7) {
    transform: rotateX(300deg) translateZ(200px);
  }
</style>

<div class="box">
  <div class="center"></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
</div>
